<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--添加弹窗层-->
<html>
    <head>
        <title></title>
        <link rel="stylesheet" type="text/css" href="/Public/Index/css/workflow.css">
        <link href="/Public/Admin/css/page.css" rel="stylesheet" />
        <link href="/Public/Admin/css/layer.css" rel="stylesheet" />
        <!--<link href="/Public/Admin/css/new_plan.css" rel="stylesheet" />-->
        <!--<script src="/Public/static/jquery/jquery-2.0.3.min.js"></script>-->
        <script src="/Public/static/jquery/jquery-1.11.3.js"></script>
        <script src="/Public/static/layer/layer.js"></script> 
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <script type="text/javascript" src="/Public/Admin/js/layer.js" ></script>
        <link rel="stylesheet" type="text/css" href="/Public/static/datetimepicker-master/jquery.datetimepicker.css">
        <script type="text/javascript" src="/Public/static/datetimepicker-master/rilegou/jquery.datetimepicker.full.js" ></script>
        <!--文件上传-->
        <script type="text/javascript" src="/Public/Cropper/js/ajaxfileupload.js" ></script>
        <style>
            .advice li{list-style: none;margin-bottom: 1rem;}
            .advice li:not(:last-child){border-bottom:1px solid #E7E7E7;}
            .detailInfo span{
                font-size: 15px;
                display: inline-block;
                padding: 0px 5px 5px 0px;
            }
            .feed li{list-style: none;width: 80%;margin-left: 2rem;margin-bottom: 0px;}
            .feed li:not(:last-child){border-bottom:1px dashed #E7E7E7;}
            .feed li span{display: inline-block;}
            .icon_add {
                color: #1EB500;
                font-size: 18px;
                padding-left: 0.2rem;
                vertical-align: middle;
            }
            new_plan.css:41
            .iconfont, .div_c_r, .icon_add, .arrow {
                font-family: "iconfont";
                -webkit-font-smoothing: antialiased;
                -webkit-text-stroke-width: 0.2px;
                -moz-osx-font-smoothing: grayscale;
            }
        </style>
    </head>
    <body>
    <?php if($type == 1): ?><form id="departForm">
            <div class="bounced">
                <div class="people_left" style='overflow:auto;overflow-y：scroll;height:329px'>
                    <ul>
                        <li class="pointer pe" data-dept="0">
                            <!--<a data-url="<?php echo U('Index/getUserData',array('dept_id'=>'','flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type));?>">[符合条件]</a>-->
                            <a data-url="<?php echo U('getAjaxPage',array('dept_id'=>'','flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type));?>">[符合条件]</a>

                        </li>
                        <?php if(is_array($departs)): foreach($departs as $key=>$depart): ?><li class="pointer" data-dept="<?php echo ($depart["dept_id"]); ?>">
                                <!--<a data-url="<?php echo U('Index/getUserData',array('dept_id'=>$depart['dept_id'],'flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type));?>">[<?php echo ($depart["dept_name"]); ?>]</a>-->
                                <a data-url="<?php echo U('getAjaxPage',array('dept_id'=>$depart['dept_id'],'flow_id'=>$flow_id,'run_id'=>$run_id,'prcs_id'=>$prcs_id,'auto_type'=>$auto_type));?>">[<?php echo ($depart["dept_name"]); ?>]</a>

                            </li><?php endforeach; endif; ?>
                    </ul> 
                </div>
                <div class="people_right">
                    <p>全部经办人</p>
                    <?php if($one == 0): ?><div class="select_people">
                            <div class="checkUser dd add-all"><a>全部添加</a></div>
                            <div class="checkUser qk add-del"><a>全部删除</a></div>
                        </div><?php endif; ?>
                    <div class="select_peo">
                        <ul>
                            <?php if(is_array($users)): foreach($users as $key=>$user): if($user["checked"] && count($users) == 1): ?><li class="pointer" data-id="<?php echo ($user["user_id"]); ?>">
                                    <?php if($flow_id != null): ?><label class="checked"><img src="/Public/Index/img/s1.png" class="c-img">主办</label><?php endif; ?>
                                    <span class="c-name checked"><?php echo ($user["user_name"]); ?></span>
                                    </li> 
                                    <?php elseif($user['checked']): ?>
                                    <li class="pointer" data-id="<?php echo ($user["user_id"]); ?>">
                                    <?php if($flow_id != null): ?><label class=""><img src="/Public/Index/img/s2.png" class="c-img">主办</label><?php endif; ?>
                                    <span class="c-name checked"><?php echo ($user["user_name"]); ?></span>
                                    </li> 
                                    <?php else: ?>
                                    <li class="pointer" data-id="<?php echo ($user["user_id"]); ?>">
                                    <?php if($flow_id != null): ?><label><img src="/Public/Index/img/s2.png" class="c-img">主办</label><?php endif; ?>
                                    <span class="c-name"><?php echo ($user["user_name"]); ?></span>
                                    </li><?php endif; endforeach; endif; ?>
                        </ul>
                        <!--判断是否为流程中的选择人员，$id不存在则为其他模块-->
                        <input type="hidden" name="id" value="<?php echo ((isset($id) && ($id !== ""))?($id):0); ?>">
                        <input type="hidden" name="table_key" value="<?php echo ((isset($table_key) && ($table_key !== ""))?($table_key):0); ?>">
                        <input type="hidden" name="flow_id" value="<?php echo ((isset($flow_id) && ($flow_id !== ""))?($flow_id):0); ?>">
                        <input type="hidden" id="url" value="<?php echo U('getAjaxPage');?>">
                        <!--是否为设计流程自动选人的参数-->
                        <input type="hidden" id="flow_type" value="<?php echo ((isset($flow_type) && ($flow_type !== ""))?($flow_type):0); ?>"/>
                        <!--流程查询选项人员时的参数-->
                        <input type="hidden" id="one" value="<?php echo ($one); ?>">
                        <!--流程表单中增加选择人员控件-->
                         <input type="hidden" id="form" value="<?php echo ($form); ?>">
                    </div>
                </div>
            </div>
            <div class="page"><?php echo ($pages); ?></div>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer submitRole" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <?php elseif($type == 2): ?>
        <div class="bounced select_peo">
            <form id="prcsForm">
                <ul class="flow2">
                    <?php if(is_array($runs)): foreach($runs as $key=>$run): ?><li>
                            <input type="radio" name="flow_prcs" value="<?php echo ($run["prcs_id"]); ?>"/>
                        <sapn class="flowName" data-url="<?php echo U('Flow/backFlow',array('run_id'=>$run['run_id'],'prcs_id'=>$run['prcs_id'],'flow_prcs'=>$run['prcs_id'],'current_prcs_id'=>$currPrcsId,'current_flow_prcs'=>$currFlowPrcs));?>"><?php echo ($run["prcs_name"]); ?></span>
                            </li><?php endforeach; endif; ?>
                </ul>
            </form>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer submitBack" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <?php elseif($type == 3): ?>
        <div class="people_main">
            <!--<p style="font-size:1.4em;font-weight: bold">全部部门</p>-->
            <div class="select_people" style="margin-left:7%;">
                <div class="checkUser dd add-all-dept"><a>全部添加</a></div>
                <div class="checkUser qk add-del-dept"><a>全部删除</a></div>
            </div>
            <div class="select_peo select_dept" style='overflow:auto;overflow-y：scroll;height:298px'>
                <ul>
                    <!--<li class="pointer" data-id="ALL_DEPT"><span class="all-line">全体部门</span></li>-->
                    <?php if(is_array($depts)): foreach($depts as $key=>$dept): ?><li class="pointer" data-id="<?php echo ($dept["dept_id"]); ?>">
                            <span class="all-line"><?php echo ($dept["dept_name"]); ?></span>
                        </li><?php endforeach; endif; ?>
                </ul>
            </div>
            <div class="sure_submit" style="text-align: center;margin-top:30px">
                <input type="hidden" id="field" value="<?php echo ($field); ?>">
                <a class="sure pointer submitDept" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <?php elseif($type == 4): ?>
        <form id="diaryForm" method="post" action="{U('Personal/commentDiary')}">
            <div id="comment_content"><textarea style="width:80%;height:10em;border:1px solid #CFDDEA;margin-left: 10%;margin-top: 5px;"></textarea></div>
            <div class="sure_submit" style="text-align: center;">
                <a class="sure pointer submitCommentDiary" style="margin-right:10px" data-url="<?php echo U('Personal/commentDiary',array('comment_id'=>$comment_id,'dia_id'=>$dia_id));?>">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <?php elseif($type == 5): ?>
        <div class="people_main">
            <div class="content" style="text-align: center">
                <textarea class="feedback" id="content" alt='批注' style="width:90%;height:18em;"></textarea>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" class="plan_id" value="<?php echo ($id); ?>">
                <input type="hidden" class="is_end" value="<?php echo ($is_end); ?>">
                <input type="hidden" class="dept" value="<?php echo ($dept); ?>">
                <input type="hidden" class="cType" value="<?php echo ($cType); ?>">
                <input type="hidden" class="lng" value="" />
                <input type="hidden" class="lat" value="" />
                <a class="sure pointer submitComment" style="margin-right:10px" data-url="<?php echo U('Plan/comment');?>">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <?php elseif($type == 6): ?>
        <form>
            <div id="reply_content"><textarea name="content" style="width:80%;height:10em;border:1px solid #CFDDEA;margin: 3% 10%;"></textarea></div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="dia_id" value="<?php echo ($dia_id); ?>">
                <input type="hidden" name="comment_id" value="<?php echo ($comment_id); ?>">
                <a class="sure pointer submitReplyDiary" style="margin-right:10px" data-url="<?php echo U('Personal/replyDiary',array('comment_id'=>$comment_id));?>">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <?php elseif($type == 7): ?>
        <div class="people_main" style="margin:0;height:400px">
            <div class="select_people" style="margin-left:5em">
                <div class="checkUser dd add-all-priv"><a>全部添加</a></div>
                <div class="checkUser qk add-del-dept"><a>全部删除</a></div>
            </div>
            <div class="select_peo">
                <ul style="overflow: auto;height:336px">
                    <?php if(is_array($privs)): foreach($privs as $key=>$priv): ?><li class="pointer" data-id="<?php echo ($priv["user_priv"]); ?>">
                            <span class="all-line-priv"><?php echo ($priv["priv_name"]); ?></span>
                        </li><?php endforeach; endif; ?>
                </ul>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" id="key_id" value="<?php echo ($key_id); ?>">
                <input type="hidden" id="field" value="<?php echo ($field); ?>">
                <a class="sure pointer submitRole" style="margin-right:10px">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </div>
        <?php elseif($type == 8): ?>
        <form>
            <div class="verifyArea">
                <table>
                    <tr>
                        <td width="30%">标题：</td>
                        <td><?php echo ($data["subject"]); ?></td>
                    </tr>
                    <tr>
                        <td width="30%">发布人：</td>
                        <td><?php echo (getChineseName($data["from_id"])); ?></td>
                    </tr>
                    <tr>
                        <td width="30%">发布范围：</td>
                        <td>
                    <?php if($data['to_id'] != ''): ?><font style='color:#1781d0;font-weight:bolder;'>部门：</font><?php echo (getMoreDeptname($data["to_id"])); ?><br><?php endif; ?>
                    <?php if($data['priv_id'] != ''): ?><font style='color:#1781d0;font-weight:bolder;'>角色：</font><?php echo (getMorePrivname($data["priv_id"])); ?><br><?php endif; ?>
                    <?php if($data['user_id'] != ''): ?><font style='color:#1781d0;font-weight:bolder;'>人员：</font><?php echo (getMoreUsername($data["user_id"])); endif; ?>
                    </td>
                    </tr>
                    <tr>
                        <td width="30%">发布时间：</td>
                        <td><input class="datepickerInput" data-type="1" type="text" name="SEND_TIME" value="<?php echo ($data["send_time"]); ?>"></td>
                    </tr>
                    <tr>
                        <td width="30%">生效日期：</td>
                        <td><input class="datepickerInput" type="text" data-type="0" name="BEGIN_DATE" value="<?php echo ($data["begin_date"]); ?>"></td>
                    </tr>
                    <tr>
                        <td width="30%">终止日期：</td>
                        <td><input class="datepickerInput" type="text" data-type="0" name="END_DATE" value="<?php echo ($data["end_date"]); ?>"></td>
                    </tr>
                    <!--                    <tr>
                                            <td width="30%">置顶：</td>
                                            <td>
                                                <input type="checkbox" name="TOP" style='width:16px;' vlaue='<?php echo ($notify["top"]); ?>' <?php echo ($notify['top'] ? 'checked' :''); ?>>设置为置顶 
                                                <input type="text" name="TOP_DAYS" style="width:30px" value='<?php echo ($notify["top_days"]); ?>'>天后结束置顶
                                            </td>
                                        </tr>-->
                    <tr>
                        <td width="30%">是否批准：</td>
                        <td>
                            <input type="radio" name="PUBLISH" value="1" class="pass">批准
                            <input type="radio" name="PUBLISH" value="3" class="noPass" style="margin-left:3em;">不批准
                        </td>
                    </tr>
                    <tr class="valid_textarea">
                        <td width="30%">意见：</td>
                        <td><textarea name="REASON" id="reason"></textarea></td>
                    </tr>
                </table>
            </div>
            <div class="sure_submit" style="text-align: center">
                <?php if($table == 'notify'): ?><input type="hidden" name="notify_id" value="<?php echo ($data["notify_id"]); ?>">
                    <a class="sure pointer submitVerify" style="margin-right:10px" data-url="<?php echo U('Erp/noticeApprove');?>">确定</a>
                    <?php elseif($table == 'document'): ?>
                    <input type="hidden" name="document_id" value="<?php echo ($data["document_id"]); ?>">
                    <a class="sure pointer submitVerify" style="margin-right:10px" data-url="<?php echo U('Erp/documentApprove');?>">确定</a><?php endif; ?>

                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <?php elseif($type == 9): ?>
        <div id="reason_cont">
            <p><font color="#1781d0"><?php echo (getChineseName($data["auditer"])); ?></font>&nbsp;&nbsp;领导的审批意见：</p>
            <div><?php echo ($data["reason"]); ?></div>
        </div>
        <?php elseif($type == 10): ?>
        <ul class="">
            <?php if(is_array($months)): foreach($months as $key=>$month): ?><li class="checkMonth pointer" data-month="<?php echo ($key); ?>"><?php echo ($month); ?></li><?php endforeach; endif; ?>
        </ul>
        <input type="hidden" id="monthUrl" value="<?php echo U('Plan/historyList');?>">
        <?php elseif($type == 11): ?>
        <div class="content" style="padding: 10px 15px">
            <h2>流程名称：<?php echo ($info["flow_name"]); ?></h2>
            <div>
                <p style="color:#3f9bca;margin-top:15px;font-size:18px;line-height:50px;font-weight: bold">说明文字</p>
                <div><?php echo ((isset($info["flow_desc"]) && ($info["flow_desc"] !== ""))?($info["flow_desc"]):"无说明文字"); ?></div>
            </div>
            <div style="margin-top:15px">
                <p style="color:#3f9bca;margin-top:15px;font-size:18px;line-height:50px;font-weight: bold">说明文档</p>
                <div>
                    <?php if($info['uploads'] != null): ?><a href="<?php echo ($info["uploads_url"]); ?>" download="<?php echo ($info["uploads"]); ?>"><?php echo ($info["uploads"]); ?></a>
                        <?php else: ?>
                        <span>无说明文档</span><?php endif; ?>
                </div>
            </div>
        </div>
        <?php elseif($type == 12): ?>
        <form id="newsForm" method="post" action="{U('News/replyComment')}">
            <div><textarea id="reply_content" style="width:80%;height:10em;border:1px solid #CFDDEA;margin-left: 10%;"></textarea></div>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer submitReplyNews" style="margin-right:10px" data-url="<?php echo U('Personal/replyComment',array('comment_id'=>$comment_id,'news_id'=>$news_id));?>">确定</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <?php elseif($type == 13): ?>
        <link rel="stylesheet" href="/Public/Admin/css/style.css"/>
        <div class="verifyArea">
            <!-- 表单项 -->
            <form id="flowPriv">
                <div class="power-layer">
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权类型</label>
                        <div class="layui-input-block">
                            <select name="priv_type" class="">
                                <option value="0" <?php echo ($priv['priv_type'] == 0 ? 'selected' : ''); ?>>全部</option>
                                <!--<option value="1">管理</option>-->
                                <!--<option value="2">监控</option>-->
                                <option value="3" <?php echo ($priv['priv_type'] == 3 ? 'selected' : ''); ?>>查询</option>
                                <!--                                <option value="4">编辑</option>
                                                                <option value="5">点评</option>-->
                            </select>
                        </div>
                    </div>
                </div>
                <div class="power-layer">
                    <div class="layui-form-item">
                        <label class="layui-form-label">管理范围</label>
                        <div class="layui-input-block">
                            <select name="priv_scope" class="">
                                <option value="ALL_DEPT" <?php echo ($priv['priv_scope'] == 'ALL_DEPT' ? 'selected' : ''); ?>>全体部门</option>
                                <option value="SELF_ORG" <?php echo ($priv['priv_scope'] == 'SELF_ORG' ? 'selected' : ''); ?>>本机构</option>
                                <option value="SELF_DEPT" <?php echo ($priv['priv_scope'] == 'SELF_DEPT' ? 'selected' : ''); ?>>本部门及下属部门</option>
                                <option value="SELF_BRANCH" <?php echo ($priv['priv_scope'] == 'SELF_BRANCH' ? 'selected' : ''); ?>>本部门（不含下属部门）</option>
                                <option value="CUSTOM" <?php echo ($priv['priv_scope'] == 'CUSTOM' ? 'selected' : ''); ?>>自定义部门</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="power-layer">
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权范围（人员）</label>
                        <div class="layui-input-block value">
                            <div class="auto_user textarea">
                                <span></span>
                                <?php if($priv['users'] != null): if(is_array($priv["users"])): foreach($priv["users"] as $key=>$user): ?><span style="padding-right:10px">
                                            <a><?php echo (getChineseName($user)); ?></a><img class="pointer delOperator" data-id="<?php echo ($user); ?>" src="/Public/Index/img/close_red.png" alt="close" width="12">
                                            <input type="hidden" name="user_ids[]" value="<?php echo ($user); ?>">
                                            <input type="hidden" name="user_names[]" value="<?php echo (getChineseName($user)); ?>">
                                        </span><?php endforeach; endif; endif; ?>
                            </div>
                            <a class="pointer flowCheckUser" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/add.png"/> 添加&nbsp;&nbsp;</a>
                            <a class="pointer clearData" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/del1.png"/> 清空</a>
                        </div>
                        <!--定义数据表中的键名-->
                        <input type="hidden" id="userField" value="user" />
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权范围（部门）</label>
                        <div class="layui-input-block value">
                            <div class="textarea depart">
                                <span></span>
                                <?php if($priv['depts'] != null): if(is_array($priv["depts"])): foreach($priv["depts"] as $key=>$dept): ?><span style="padding-right:10px">
                                            <a><?php echo (getDeptName($dept)); ?></a><img class="pointer delOperator" data-id="<?php echo ($dept); ?>" src="/Public/Index/img/close_red.png" alt="close" width="12">
                                            <input type="hidden" name="dept[]" value="<?php echo ($dept); ?>">
                                            <input type="hidden" name="dept_name[]" value="<?php echo (getDeptName($dept)); ?>">
                                        </span><?php endforeach; endif; endif; ?>
                            </div>
                            <a class="pointer addDept" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/add.png"/> 添加&nbsp;&nbsp;</a>
                            <a class="pointer clearData" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/del1.png"/> 清空</a>
                        </div>
                        <!--定义数据表中的键名-->
                        <input type="hidden" id="deptField" value="dept" />
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">授权范围（角色）</label>
                        <div class="layui-input-block value">
                            <div class="textarea priv">
                                <span></span>
                                <?php if($priv['roles'] != null): if(is_array($priv["roles"])): foreach($priv["roles"] as $key=>$prive): ?><span style="padding-right:10px">
                                            <a><?php echo (getPrivName($prive)); ?></a><img class="pointer delOperator" data-id="<?php echo ($prive); ?>" src="/Public/Index/img/close_red.png" alt="close" width="12">
                                            <input type="hidden" name="role[]" value="<?php echo ($prive); ?>">
                                            <input type="hidden" name="priv_name[]" value="<?php echo (getPrivName($prive)); ?>">
                                        </span><?php endforeach; endif; endif; ?>
                            </div>
                            <a class="pointer addPriv" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/add.png"/> 添加&nbsp;&nbsp;</a>
                            <a class="pointer clearData" style="vertical-align: bottom;display:inline-block"><img src="/Public/Admin/images/del1.png"/> 清空</a>
                        </div>
                        <!--定义数据表中的键名-->
                        <input type="hidden" id="field" value="role" />
                    </div>
                </div>
                <div class="sure_submit" style="text-align: center">
                    <input type="hidden" name="id" value="<?php echo ((isset($id) && ($id !== ""))?($id):0); ?>" />
                    <a class="sure pointer submitFlowPriv" style="margin-right:10px" data-url="<?php echo U('Flow/flowPriv');?>">确定</a>
                    <a class="sure pointer cancel" >取消</a>
                </div>
                <!--加前缀为了区分选人弹窗是否有主办，name="flow_id"有主办选项，此处不需要-->
                <input type="hidden" name="pro_flow_id" value="<?php echo ($flow_id); ?>">
            </form>
        </div>
        <?php elseif($type == 14): ?>
        <!--设计流程中的预览表单-->
        <link href="/Public/Admin/css/form.css" rel="stylesheet" /> 
        <link href="/Public/Admin/css/layer.css" rel="stylesheet" />
        <div class="layui-tab-content larry-personal-body clearfix mylog-info-box">
            <div class="layui-tab-item layui-field-box layui-show" >
                <div style="font-size:14px;" class="form">
                    <?php echo ($design_content); ?>
                </div>
            </div>
        </div>
        <?php elseif($type == 15): ?>
        <style>
            .box .icon-date{
                background:url('/Public/Admin/images/date.png') no-repeat right center;
                width: 25px;
                height: 25px;
                position: absolute;
                top: 2px;
                right: 25px;
                cursor:pointer;
            }
        </style>
        <form>
            <div class="dirayArea">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-block box" style="position: relative;width:200px;">
                        <i class='icon-date datepickerInput' id="diary_date"></i>
                        <input name="SUBJECT" id="subject" class="layui-input" <?php if($dia_id == ''): ?>value='<?php echo ($subject); ?>'<?php else: ?>value='<?php echo ($diary["subject"]); ?>'<?php endif; ?> style="display:inline;">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">内容</label>
                    <div class="layui-input-block">
                        <textarea name="CONTENT" id="content" style="width:100%;height:200px"><?php echo ($diary["content"]); ?></textarea>
                    </div>
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type='hidden' name='dia_id' value='<?php echo ($diary["dia_id"]); ?>'>
                <input type='hidden' name='type' value='1'>
                <a class="sure pointer btn-submit ajax-post" data-url="<?php echo U('Personal/saveDiary',array('type'=>1));?>" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <?php elseif($type == 16): ?>
        <form>
            <div class="g-content" style="padding:15px">
                <div class="verifyArea">
                    <table>
                        <tr style="font-weight: bold;text-align: center">
                            <td>名称</td>
                        <?php if($ctrl == 'plan'): ?><td>模式</td><?php endif; ?>
                        <td>操作</td>
                        </tr>
                        <?php if(is_array($cates)): foreach($cates as $key=>$cate): ?><tr>
                                <td class="left" align="center">
                                    <span><?php echo ($cate["name"]); ?></span>
                                    <input type="text" name="name[]" value="<?php echo ($cate["name"]); ?>" class="hide" style="width:120px">
                                    <input type="hidden" name="id[]" value="<?php echo ($cate["id"]); ?>">
                                </td>
                            <?php if($ctrl == 'plan'): ?><td class="middle">
                                    <span><?php echo ($cate["mode"]); ?></span>
                                    <input type="text" name="editmode[]" value="<?php echo ($cate["mode"]); ?>" class="hide" style="width:10px">
                                </td><?php endif; ?>
                            <td class="right" align="center">
                                <a class="editGoodsCate pointer">编辑&nbsp;&nbsp;</a>
                                <a class="delCate pointer" data-url="<?php echo U('delCate',array('id'=>$cate['id'],'ctrl'=>$ctrl));?>">删除</a>
                            </td>
                            </tr><?php endforeach; endif; ?>
                        </tbody>
                    </table>
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">类别名称：</span>
                    <input type="text" name="addname" value="" style="padding:5px" />
                </div>
                <?php if($ctrl == 'plan'): ?><div class="g-input">
                        <span style="font-size: 13px">模式：</span>
                        <input type="radio" name="mode" value="0">简洁模式
                        <input type="radio" name="mode" value="1" style="margin-left:15px;" checked="true">标准模式
                    </div><?php endif; ?>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="ctrl" value="<?php echo ($ctrl); ?>" />
                <a class="sure pointer btn-submit ajax-post" data-url="<?php echo U('Base/saveCate');?>" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <?php elseif($type == 17): ?>
        <form>
            <div class="g-content" style="padding:15px">
                <div class="verifyArea">
                    <table>
                        <tr style="font-weight: bold;text-align: center">
                            <td>分组名称</td>
                            <td>操作</td>
                        </tr>
                        <?php if(is_array($groups)): foreach($groups as $key=>$group): ?><tr>
                                <td class="left" align="center">
                                    <span><?php echo ($group["group_name"]); ?></span>
                                    <input type="text" name="name[]" value="<?php echo ($group["group_name"]); ?>" class="hide" style="width:120px">
                                    <input type="hidden" name="id[]" value="<?php echo ($group["id"]); ?>">
                                </td>
                                <td class="right" align="center">
                                    <a class="editGoodsCate pointer">编辑&nbsp;&nbsp;</a>
                                    <a class="delete pointer" data-url="<?php echo U('Erp/delGroup',array('id'=>$cate['id']));?>">删除</a>
                                </td>
                            </tr><?php endforeach; endif; ?>
                        </tbody>
                    </table>
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">分组名称：</span>
                    <input type="text" name="group_name" value="" style="padding:5px" />
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <a class="sure pointer btn-submit ajax-post" data-url="<?php echo U('Erp/saveGroup');?>" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <?php elseif($type == 18): ?>
        <form>
            <div class="g-content" style="padding:15px">
                <div class="g-input">
                    <span style="font-size: 13px">分类名称：</span>
                    <input type="text" name="sort_name" value="<?php echo ($info["sort_name"]); ?>" style="padding:5px" />
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">分类排序：</span>
                    <input type="text" name="sort_no" value="<?php echo ($info["sort_no"]); ?>" style="padding:5px" />
                </div>
                <div class="g-input">
                    <span style="font-size: 13px">所属部门：</span>
                    <select name="dept_id">
                        <option value="0">全体部门</option>
                        <?php if(is_array($depts)): foreach($depts as $key=>$dept): ?><option value="<?php echo ($dept["dept_id"]); ?>"><?php echo ($dept["dept_name"]); ?></option><?php endforeach; endif; ?>
                    </select>
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="ctrl" value="<?php echo ($ctrl); ?>" />
                <input type="hidden" name="id" value="<?php echo ((isset($info["sort_id"]) && ($info["sort_id"] !== ""))?($info["sort_id"]):0); ?>">
                <a class="sure pointer btn-submit ajax-post" data-url="<?php echo U('Flow/setCate');?>" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <?php elseif($type == 19): ?>
        <form>
            <div class="g-content" style="padding:15px;overflow-y:scroll; width:519px; height:210px;">
                <div class="g-input">
                    <textarea name="content" placeholder="请描述问题……" style="width:80%;height:10em;border:1px solid #CFDDEA;margin-left: 10%;margin-top: 5px;"></textarea>
                </div>
                <div class="g-input">
                    <a href="#" id="upload" style='margin-top: 7px;display: inline-block;font-size: 12px;margin-left: 10%;'><span class="fj">上传图片</span><span class="icon_add">&#xe638;</span></a>
                    <div class="filename-cont" style="margin-left: 10%;">
                        <span><?php if($info["uploads"] != ''): echo ($info["uploads"]); ?><img src="/Public/Index/img/close.png" style="width:15px" class="pointer delfile" data-fileurl="<?php echo ($info["uploads_url"]); ?>"/><?php endif; ?></span>
                    </div>
                    <input type="file" id="inputImage" name='imgfile' style="display:none">
                    <input type="hidden" id="filename" name="uploads" value="<?php echo ($info["uploads"]); ?>">
                    <input type="hidden" id="fileurl" name="uploads_url" value="<?php echo ($info["uploads_url"]); ?>">
                    <input type="hidden" name="url" value="<?php echo U('Base/delFile',array('table'=>'notify','field'=>'notify_id','id'=>$notify_id));?>">
                </div>
            </div>
            <div class="sure_submit" style="text-align: center">
                <input type="hidden" name="id" value="<?php echo ($questionId); ?>">
                <a class="sure pointer btn-submit ajax-post" data-url="<?php echo U('Index/question');?>" data-form="">提交</a>
                <a class="sure pointer cancel" >取消</a>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
        <?php elseif($type == 20): ?>
        <form>
            <div class="g-content" style="padding:15px;overflow-y:scroll; width:519px; height:365px;">
                <div class="g-input">
                    <ul class='advice'>
                        <?php if(is_array($list)): foreach($list as $key=>$advice): ?><li>
                                <div class='detailInfo'>
                                    <span><?php echo ($key+1); ?>.</span>
                                    <span style='color:#5091CB'><?php echo (getChineseName($advice["user_id"])); ?></span>
                                    <span>时间：<?php echo ($advice["create_time"]); ?></span>
                                    <?php if($is_handle == 0): ?><span class="pointer delQuestion" style='margin-left:5px;color:#5091CB' data-id="<?php echo ($advice["id"]); ?>" data-url="<?php echo U('delQuestion');?>">删除</span><?php endif; ?>
                                    <p></p>
                                    <span style="display:block;margin-left: 2rem;"><?php echo ($advice["content"]); ?></span>
                                    <?php if($advice["uploads_url"] != ''): if(is_array($advice["uploads_url"])): foreach($advice["uploads_url"] as $key=>$file): ?><a href='<?php echo ($file); ?>' target='self'><img src="<?php echo ($file); ?>" style='width:50px;height: 50px;margin-right: 5px;'></a><?php endforeach; endif; endif; ?>
                                    <?php if(!empty($advice["reply"])): ?><ul class='feed'>
                                            <?php if(is_array($advice['reply'])): foreach($advice['reply'] as $key=>$feed): ?><li>
                                                    <span style='display: block;'>【反馈(<?php echo ($key+1); ?>)】：</span>
                                                    <span style='color:#5091CB;margin-left: 2rem'><?php echo (getChineseName($feed["user_id"])); ?></span>
                                                    <span>时间：<?php echo ($feed["create_time"]); ?></span>
                                                    <?php if($is_handle == 1): ?><span class="pointer delQuestion" style='margin-left:5px;color:#5091CB' data-id="<?php echo ($feed["id"]); ?>" data-url="<?php echo U('delQuestion');?>">删除</span><?php endif; ?>
                                                    <p></p>
                                                    <span style="display:block;margin-left: 3rem;"><?php echo ($feed["content"]); ?></span>
                                                </li><?php endforeach; endif; ?>
                                        </ul><?php endif; ?>
                                    <?php if($is_handle == 1): ?><span class="submitAdvice pointer" style="display:inline-block;float: right;color:#5091CB;" data-id="<?php echo ($advice["id"]); ?>" data-url="<?php echo U('question');?>">答复</span><?php endif; ?>
                                    <p style="clear:both;"></p>
                                </div>
                            </li><?php endforeach; endif; ?>
                    </ul>
                </div>
            </div>
        </form>
        <script type="text/javascript" src="/Public/Admin/js/common.js" ></script><?php endif; ?>

    <script src="https://api.map.baidu.com/api?v=2.0&ak=ZoVYMpI2FZWKafTn6GIjojqinVFGHMbI&s=1" type="text/javascript"></script>  
    <script type="text/javascript" src="http://developer.baidu.com/map/jsdemo/demo/convertor.js"></script> 
    <script type="text/javascript" src="/Public/static/dropload/dropload.js" ></script>
    <script type="text/javascript" src="/Public/Admin/js/flow.js"></script>

    <!--编辑器-->
    <script type="text/javascript" src="/Public/static/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="/Public/static/ueditor/ueditor.all.min.js"></script>
    <script  type="text/javascript">
        $(initAddCate());
        $(initLayer());
        $(dateTime(0));
        $(initFlowStep());
        $(initUpload("<?php echo U(CONTROLLER_NAME.'/upload');?>","advice"));
        $(function () {
            $('#testTime').datetimepicker({
                format: "Y-m-d", ////格式化日期
                lang: 'ch', //设置语言
                timepicker: false, //关闭时间选项
            });

            var geolocation = new BMap.Geolocation();
            geolocation.getCurrentPosition(function (r) {
                if (this.getStatus() == BMAP_STATUS_SUCCESS) {
                    var mk = new BMap.Marker(r.point);
                    lat = r.point.lat; //纬度
                    lng = r.point.lng;   //经度
                    $('body').find('.lng').val(lng);
                    $('body').find('.lat').val(lat);
                }
            })

        })

//        var width = $('#content').width();
//        var ue = UE.getEditor('content', {
//            initialFrameWidth: width,
//            initialFrameHeight: 200,
//            toolbars: [[
//                    "source","insertunorderedlist", "insertorderedlist", "unlink", "link",
//                    "searchreplace", "preview", "pagebreak", "simpleupload", "emotion",
//                    "date", "time", "horizontal", "pasteplain",
//                    "bold", "italic", "underline", "strikethrough", "forecolor", "backcolor",
//                    "superscript", "subscript", "justifyleft", "justifycenter", "justifyright", "justifyjustify",
//                    "formatmatch", "removeformat", "lineheight", "fontfamily", "fontsize",
//                ]],
//        });

    </script>
</body>
</html>